package com.ocom.payconfig.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.ocom.common.entity.card.EntityXfDeviceInfo;
import com.ocom.common.request.payconfig.*;
import com.ocom.payconfig.vo.GetConsDeviceInfoVo;

import java.text.ParseException;
import java.util.List;

//消费机器
public interface XfDeviceInfoService extends IService<EntityXfDeviceInfo> {

	public EntityXfDeviceInfo GetDeviceInfo(Long comId, String machNo);

	public void updateAppVer(Long comId, String machNo, String versionCode);


	PageInfo<EntityXfDeviceInfo> getConsDeviceInfo(Long companyId, GetConsDeviceInfoRequest request);

	EntityXfDeviceInfo addConsDeviceInfo(Long companyId, AddConsDeviceInfoRequest request);

	EntityXfDeviceInfo updateConsDeviceInfo(Long companyId, UpdateConsDeviceInfoRequest request) throws ParseException;

	boolean deleteConsDeviceInfo(Long companyId, DeleteConsDeviceInfoRequest request);

	// 2.14.获取消费设备信息(getConsDeviceInfo)
	public List<EntityXfDeviceInfo> GetConsDeviceList(Long comId, GetConsDeviceInfoVo getConsDeviceInfoVo);

	//将单位下的所有机器的白名单状态更新为1
	public  void  updateListState(Long comId);

	//将单位下的所有机器的白名单状态更新为1
	public  void  updateListState(Long companyId,List<Long> comIds);

	Boolean updatePara(Long comId);

    boolean UpdateList(Long companyId, String strMachNo);

    boolean UpdateResetMach(Long companyId, String strMachNo);

	 List<EntityXfDeviceInfo> getMachList(Long comId, Integer pointId);

	boolean updateMenuState(Long comId, String strPoints);

	boolean updateDishesAllDownload(Long comId, Integer merchId, String strPoints);


	Boolean updateMenu(Long companyId, String machNo,
					   Integer menuState,
					   Integer menuAdd,
					   Integer menuAddTab,
					   Integer menuDelete,
					   Integer menuMerchId
	);

	Boolean updateMenu(Long companyId, Integer pointId,
					   Integer menuState,
					   Integer menuAdd,
					   Integer menuAddTab,
					   Integer menuDelete,
					   Integer menuMerchId
	);


	List<EntityXfDeviceInfo> getMachList(Long comId, GetConsDeviceInfoByAgentRequest request);

	Boolean updateCodeUrl(Long companyId, String machNo, String codeUrl);

	Boolean removeConsDevicePayCode(Long companyId, String machNo);
	Boolean updateAccountCodePicUrl(Long companyId, String machNo, String codeUrl);

	Boolean removeConsAccountPayCode(Long companyId, String machNo);
	//德生
	Boolean addConsDeviceInfo(Long companyId, EntityXfDeviceInfo entityXfDeviceInfo);

	public EntityXfDeviceInfo getDeviceInfo2(Long companyId, String machNo,long inc);

	public void deleteSession(Long companyId);

}